<?php

namespace app\mini\ui\form;

use app\mini\enum\TypeEnum;

/**
 * 小程序路径表单
 */
class MiniPathForm
{
    public function name()
    {
        return array(
            'type' => 'input',
            'title' => '名称',
            'field' => 'name',
            'validate' =>
                array(
                    0 =>
                        array(
                            'required' => true,
                            'message' => '不能为空',
                        ),
                ),
        );
    }

    public function path()
    {
        return array(
            'type' => 'input',
            'title' => '小程序路径',
            'field' => 'path',
            'validate' =>
                array(
                    0 =>
                        array(
                            'required' => true,
                            'message' => '不能为空',
                        ),
                ),
        );
    }

    public function type()
    {
        return array(
            'type' => 'radio',
            'options' => TypeEnum::toZhArrayForSelect(),
            'title' => '类型',
            'field' => 'type',
        );
    }
}